SystemPrint.log('初始化-开始')
Import("ocr.js")

Import("utils.js")
if (!isBlueMode()) {
    require("Bear_plugin.js")
    if (!OTG_init()) {
        log('OTG初始化未完成')
        stopAll()
    }
}
Import("ggUtils.js")
Import("ggUtils快手直播.js")
Import("A快手极速版.js")

start_app_KSJSB()

expectView(() => {
    var detects搜索 = opencv.findImagesEx('图色534395.cv');
    if (detects搜索 != null) {
        return detects搜索[0]
    }
    return null
}, () => {
    agentSwipBiger()
    sleep.second(3)
}, (findView) => {
    agentOrHidClick(findView, 3)

    Clipboard.copy('汽车直播')
    sleep.second(2)
    agentOrHidClick(ocrTextMoreInRegion(0, 0.4, 1, 1, '汽车直播', '汽车直', '车直播'), 3)

    var flagzb = ocrWaitForText('奇瑞汽车', '奇瑞', '瑞汽车')
    if (flagzb) {
        agentOrHidClickOffectY(flagzb, 100)
    } else {
        agentOrHidback()
        sleep.second(2)
        agentOrHidback()
        sleep.second(2)
        agentOrHidClick(findView)

        Clipboard.copy('财经直播')
        sleep.second(2)
        agentOrHidClick(ocrTextMoreInRegion(0, 0.4, 1, 1, '财经直播', '经直播', '财经直'), 3)
    }



})

watch_ks_直播()

